/*******************************************************************************
 * Copyright (c) 2011 LegSem.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 * Contributors:
 *     LegSem - initial API and implementation
 ******************************************************************************/
package com.legstar.eci.xmi.model;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

/**
 * This maps the SOAP binding element.
 *
 */
@XStreamAlias("binding")
public class WsdlBinding {

	@XStreamAsAttribute
	private String name;
	
	@XStreamAsAttribute
	private String type;
	
	/**
	 * Represents the ECI binding.
	 */
	@XStreamImplicit()
	private List < WsdlBinding > bindings;

	@XStreamImplicit()
	private List < PhysicalFormats > physicalFormats;

	@XStreamImplicit()
	private List < BindingTypeMapping > bindingTypeMappings;

	@XStreamImplicit()
	private List < BindingEciOperation > operations;

	/** {@inheritDoc}*/
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("[");
		sb.append("name" + ":" + name + "");
		sb.append(",");
		sb.append("type" + ":" + type + "");
		sb.append(",");
		sb.append("bindings" + ":" + bindings + "");
		sb.append(",");
		sb.append("physicalFormats" + ":" + physicalFormats + "");
		sb.append(",");
		sb.append("bindingTypeMappings" + ":" + bindingTypeMappings + "");
		sb.append(",");
		sb.append("operations" + ":" + operations + "");
		sb.append("]");
		return sb.toString();
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @return the physicalFormats
	 */
	public List<PhysicalFormats> getPhysicalFormats() {
		return physicalFormats;
	}

	/**
	 * @return the bindingTypeMappings
	 */
	public List<BindingTypeMapping> getBindingTypeMappings() {
		return bindingTypeMappings;
	}

	/**
	 * @return the operations
	 */
	public List<BindingEciOperation> getOperations() {
		return operations;
	}

	/**
	 * @return the bindings
	 */
	public List<WsdlBinding> getBindings() {
		return bindings;
	}
}
